﻿using System;
using System.Web;
using MagickNet;

namespace MagickServer.Services {
    public class VirtualFileImageSource : IImageSource {
        private readonly HttpServerUtilityBase server;

        public VirtualFileImageSource(HttpServerUtilityBase server) {
            this.server = server;
        }

        public Image GetImage(string key) {
            return new Image(server.MapPath(key));
        }
    }
}